import axios from 'axios';
import './c7nConfig';

axios.interceptors.response.use(response=>{
  const { status, data } = response;
  if (status === 204) {
    return response;
  }
  if (data && data.failed) {
    // notification.error({
    //   message: data.message,
    // });
    throw data;
  } else {
    return data;
  }
});
